package org.rabbitmq.topic.provider.service;

import java.util.UUID;

import org.rabbitmq.topic.common.enums.ExchangeEnum;
import org.rabbitmq.topic.common.enums.TopicEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
*@author LSY
*Time: 2018年12月7日下午2:18:33
*
*
*/
@Service
public class UserService {

	@Autowired
	private QueueMessageService queueMessageService;
	
	public String randomCreateUser() throws Exception {
		 String userId = UUID.randomUUID().toString();
		 queueMessageService.send(userId, ExchangeEnum.USER_REGISTER_TOPIC_EXCHANGE, TopicEnum.USER_REGISTER.getTopicRouteKey());
		 return userId;
	}
}
